Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Controlling the Display Mode

Each video output device has a finite number of display modes. Each mode has several characteristics, including width and height of the display, pixel depth, and video refresh rate. This section describes functions for getting and setting the display mode.

To get a list of the display modes supported by a video output component, call the QTVideoOutputGetDisplayModeList function. The list is a QT atom container, and list atoms contain the characteristics of each mode. You use QT atom container functions, such as QTFindChildByIndex , to extract the contents of the list.

To specify a display mode to use, call the QTVideoOutputSetDisplayMode function.

To find out the current display mode, call the QTVideoOutputGetDisplayMode function.

QTVideoOutputGetDisplayMode

The QTVideoOutputGetDisplayMode function gets the current display mode for a video output component.

pascal ComponentResult QTVideoOutputGetDisplayMode (
                     QTVideoOutputComponent vo,
                     long *displayModeID);
vo
Specifies the instance of a video output component. Your software obtains this reference when calling the Component Manager's OpenComponent or OpenDefaultComponent function.

displayModeID
Contains a pointer to the ID of the current display mode, or 0 if no display mode has been selected. The ID specifies a QT atom of type kQTVODisplayModeItem in the QT atom container returned by the QTVideoOutputGetDisplayModeList function. For a description of the contents of this QT atom container, see "Display Mode QT Atom Container" .

DISCUSSION

If the QTVideoOutputGetDisplayMode function returns an atom ID of 0, it indicates that no display mode has been selected.

QTVideoOutputGetDisplayModeList

The QTVideoOutputGetDisplayModeList function gets a list of the display modes supported by a video output component.

pascal ComponentResult QTVideoOutputGetDisplayModeList (
                     QTVideoOutputComponent vo,
                     QTAtomContainer *outputs);
vo
Specifies the instance of a video output component. Your software obtains this reference when calling the Component Manager's OpenComponent or OpenDefaultComponent function.

outputs
Contains a pointer to the QT atom container that lists the video modes supported by this component. For a description of the contents of this QT atom container, see "Display Mode QT Atom Container" .

DISCUSSION

When your software calls QTVideoOutputGetDisplayModeList , it must dispose of the QT atom container returned by the function by calling DisposeQTAtomContainer .

QTVideoOutputSetDisplayMode

You can use the QTVideoOutputSetDisplayMode function in your software to specify the display mode to be used by a video output component.

pascal ComponentResult QTVideoOutputSetDisplayMode(
                     QTVideoOutputComponent vo,
                     long displayModeID);
vo
Specifies the instance of a video output component for the request. Your software obtains this reference when calling the Component Manager's OpenComponent or OpenDefaultComponent function.

displayModeID
The ID of the display mode to use. The ID specifies a QT atom of type kQTVODisplayModeItem in the QT atom container returned by the QTVideoOutputGetDisplayModeList function. For a description of the contents of this QT atom container, see "Display Mode QT Atom Container" .

DISCUSSION

When software changes the display mode with the QTVideoOutputSetDisplayMode function, the change does not take effect until the next time the software calls the QTVideoOutputBegin function for the video output component. This lets the software change other output settings before displaying the video.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |